<template>
  <el-row class="appContent ai-body-blue">
    <Header></Header>
    <!-- 主体内容 -->
    <Content v-model:show="openDrawer" v-model:loading="vectorLoading" v-model:sortNum="sortNum"></Content>
    <!-- 右侧抽屉 -->
    <RightDrawer v-model:open="openDrawer" v-model:loading="vectorLoading" v-model:sortNum="sortNum"></RightDrawer>
    <!-- 左侧菜单 -->
    <LeftMenu />
  </el-row>
</template>

<script setup>
import "@/assets/styles/list.css";
import { getCurrDialogue, addDialogue } from "@/hooks/ai-dialogue";
import { has } from "lodash-es";

import Content from "./content";
import RightDrawer from "./RightDrawer";
import LeftMenu from "./LeftMenu";
import TabsArrow from "@/components/TabsArrow";
// 打开右侧抽屉
let openDrawer = ref(true);
let vectorLoading = ref(false);
let sortNum = ref(1);
// 从本地存储中获取当前会话和历史会话
onBeforeMount(() => {
  let currDialogue = getCurrDialogue();
  if (!has(currDialogue, "time")) {
    addDialogue({ flag: true });
  }
});
</script>
<style scoped lang="scss">
.appContent {
  background-image: url("@/assets/images/bg-blue.png");
  flex-direction: column;
  height: 100vh;
}
</style>
